<?php

//Always place this code at the top of the Page
session_start();
if (!isset($_SESSION['id'])) {
    // Redirection to logn page twitter or facebook
    ?>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<?php include 'includes/head.php' ?>
	<link href="css/splash.css" rel="stylesheet" type="text/css" />
	<script src="js/infieldlabel.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript" charset="utf-8">
		$(function(){ $("label").inFieldLabels(); });
	</script>
</head>

<body class="splash">
	<div id="splash_top">
        <div class="sm_logo">
            <img src="img/splash/logo.png" />
        </div>
        <div class="st_glow"></div>
    </div>
    <div id="splash_bottom">
        <div id="splash_main">
                <div class="sm_panel_container">
                    <div class="sm_panel sm_left">
                    sdfg
                    </div>
                    <div class="sm_panel sm_right">
                        <div id="splash-reg">
                            <form class="block-left color_form splash_form" name="splash-reg">
                                <div>
                                    <div class="form_item">
                                        <label for="name">Name</label>
                                        <div class="element"><input id="name" name="name" type="text" /></div>
                                    </div>
                                    <div class="form_item">
                                        <label for="school">School</label>
                                        <div class="element"><input id="school" name="school" type="text" /></div>
                                    </div>
                                    <div class="form_item">
                                        <label for="email">Email</label>
                                        <div class="element"><input id="email" name="email" type="text" /></div>
                                    </div>
                                    <div class="form_item">
                                        <label for="desc">Why you're awesome</label>
                                        <div class="element"><textarea id="desc" name="desc" /></textarea></div>
                                    </div>
                                </div>
                                <div class="submit">
                                    <input type="submit" value="">
                                </div>
                            </form>
                        </div>
                    </div>
                    <br class="cleft" />
                </div>
        </div>
    </div>
</body>
</html>    
    
    <a href="login-facebook.php">LOGIN THROUGH FACEBOOK</a><?php  } else { ?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<?php include 'includes/head.php' ?>
	<link href="css/custom.css" rel="stylesheet" type="text/css" />
</head>

<body class="home">

<div id="top">
    <div id="header">
        <?php include 'includes/nav_container.php' ?>
    </div>
</div>


<div id="wrapper">
    <table>
    	<tr>
        	<td id="col-left">
            	<?php include 'includes/current_activity.php' ?>
            </td>
        	<td id="col-main">
            	<?php include 'includes/challenges.php' ?>
            </td>
        	<!--<td id="col-right"></td>-->
        </tr>
    </table>
</div>
    <a href='logout.php?logout' >Log out</a>

	
	<div id="wrapper">
    <table>
    	<tr>
        	<td id="col-left">
            	
            </td>
        	<td id="col-main">
            	
            </td>
        	<!--<td id="col-right"></td>-->
        </tr>
    </table>
	</div>

<div id="bottom">
</div>


</body>

</html>

<?php } ?>